package com.Threecharacters.Poly_.Polyarr.Case1;

public class Student extends Person {
    private double score;

    public Student(String name, int age, int score) {
        super(name, age);
        this.score = score;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public String say(){
        return super.say() + " score " + score;
    }

    public void study(){
        System.out.println(getName() + " is studying");
    }



}



// Base base = new Sub();//向上转型
// Sub sub = (Sub) base